package hr.fer.zemris.gep;

public class Terminal implements INode {
	private  String  name;
	private ThreadLocal<Double> value;
	
	public Terminal(String name, ThreadLocal<Double> value) {
		this.name = name;
		this.value = value;
	}
	
	@Override
	public int getAirity() {
		return 0;
	}

	@Override
	public Object evaluate(Object[] args) {
		return value.get();
	}

	@Override
	public String print(NodeEvaluation[] nodeEvals) {
		return name;
	}

}
